﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Threading;
using WpfApp4;

namespace WpfApp4
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            //dv.Loaded += Dv_Loaded;
            Loaded += MainWindow_Loaded;

        }

        private void Dv_Loaded(object sender, RoutedEventArgs e)
        {
            //dv.ItemsSource = UserInfo.AllUserInfos;
        }

        private void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            DispatcherTimer dispatcherTimer = new DispatcherTimer();
            dispatcherTimer.Interval = TimeSpan.FromMilliseconds(200);
            dispatcherTimer.Start();
            dispatcherTimer.Tick += DispatcherTimer_Tick;
        }

        private void DispatcherTimer_Tick(object sender, EventArgs e)
        {
            //tb.Text = "dddf" + ff++;
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            //a++;
            //UserInfo.AllUserInfos.Insert(0, new UserInfo("insert", a, "NG", "123-123-123", false));
        }

        int a = 0;
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            //a++;
            //UserInfo userInfo = new UserInfo("ys", a, "苏州", "123-123-123", true);
        }

        int ff = 0;
        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            //tb.Text = ff++.ToString();
        }
    }
}
